function output = util(c,gam)

if gam ~= 1
    output = c.^(1-gam)./(1-gam);
else
    output = log(c);
end

end
